extends Control

@onready var day_label: Label = $VBoxContainer/DayPanel/MarginContainer/DayLabel
@onready var time_label: Label = $VBoxContainer/TimePanel/MarginContainer/TimeLabel

@export var normal_speed : int = 5
@export var fast_speed : int = 100
@export var fastx2_speed : int = fast_speed * 2

func _ready() -> void:
	DayNightCycleMgr.time_tick.connect(on_time_tick)

func on_time_tick(day: int, hour: int, minute: int) -> void:
	day_label.text = "Day " + str(day)
	time_label.text = "%02d:%02d" % [hour, minute]


func _on_normal_pressed() -> void:
	DayNightCycleMgr.game_speed = normal_speed


func _on_fast_pressed() -> void:
	DayNightCycleMgr.game_speed = fast_speed


func _on_fast_x_2_pressed() -> void:
	DayNightCycleMgr.game_speed = fastx2_speed
